package com.kaili.pojo.dto.dispatch;

import com.kaili.pojo.entity.HsEwbsDispatchDetail;
import com.kaili.pojo.entity.HsEwbsDispatcherSub;
import com.kaili.utils.Annotation.CheckField;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;

/**
 * Created by renzhikun on 18-11-28.
 */
@Data
public class DispatchAddDTO {

    @Pattern(regexp = "^[A-Za-z0-9]{0,20}$",message = "业务ID为[A-Za-z0-9]组成的1-20位字符")
    @ApiModelProperty("业务ID")
    private String operationId;

    @NotNull(message = "派送人不能为空")
    @ApiModelProperty("派送人")
    private Integer dispatcherId;

    @ApiModelProperty("网点")
    private Integer siteId;

    @NotNull(message = "车辆不能为空")
    @ApiModelProperty("车辆ID")
    private Integer carId;

    @NotNull(message = "来源不能为空")
    @ApiModelProperty("来源")
    private Integer sourceType;

    @ApiModelProperty("设备")
    private String deviceCode;

    @ApiModelProperty("货源")
    private String scanSourceId;

    @NotNull(message = "手机不能为空")
    @ApiModelProperty("手机")
    private String phone;

    @NotNull(message = "送货号不能为空")
    @ApiModelProperty("送货号")
    private String dispatchNo;

    @ApiModelProperty("送货时间")
    private String dispatchTime;

    @ApiModelProperty("送货体积")
    private BigDecimal vol;

    @ApiModelProperty("送货重量")
    private BigDecimal weight;

    @ApiModelProperty("送货件数")
    private Integer piece;

    @NotNull(message = "送货单费不能为空")
    @ApiModelProperty("送货单费")
    private Double sendCharge;

    @ApiModelProperty("送货单详情")
    @CheckField
    private List<HsEwbsDispatchDetail> details;

    @ApiModelProperty("状态")
    private Integer rdStatus;

    @ApiModelProperty("修改时间")
    private Date modifiedTime;

    @ApiModelProperty("修改人")
    private Integer modifiedBy;

    @ApiModelProperty(value = "创建人", required = true)
    private Integer createdBy;

    @ApiModelProperty(value = "创建时间", required = true)
    private Date createdTime;

    @ApiModelProperty("备注")
    private String remark;
}
